
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: built-in function filter</title>
</head><body bgcolor="#f0f0f8">
<dl><dt><a name="-filter"><strong>filter</strong></a>(...)</dt><dd><tt>filter(function&nbsp;or&nbsp;None,&nbsp;sequence)&nbsp;-&gt;&nbsp;list,&nbsp;tuple,&nbsp;or&nbsp;string<br>
&nbsp;<br>
Return&nbsp;those&nbsp;items&nbsp;of&nbsp;sequence&nbsp;for&nbsp;which&nbsp;function(item)&nbsp;is&nbsp;true.&nbsp;&nbsp;If<br>
function&nbsp;is&nbsp;None,&nbsp;return&nbsp;the&nbsp;items&nbsp;that&nbsp;are&nbsp;true.&nbsp;&nbsp;If&nbsp;sequence&nbsp;is&nbsp;a&nbsp;tuple<br>
or&nbsp;string,&nbsp;return&nbsp;the&nbsp;same&nbsp;type,&nbsp;else&nbsp;return&nbsp;a&nbsp;list.</tt></dd></dl>

</body></html>